home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-12-10 | 4.5 KB | [ TEXT/CWIE]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
66%
dexvert
Compact Compressed (Unix) (archive/compact)
ext
Supported
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, Sun Dec 10 16:49:41 1995, modified Sun Dec 10 16:49:41 1995, creator 'CWIE', type ASCII, 3874 bytes "MyHandlers.c" , at 0xfa2 454 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ CWIE]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 0c 4d 79 48 61 6e 64 | 6c 65 72 73 2e 63 00 00 |..MyHand|lers.c..| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......| |00000050| 00 00 00 00 00 0f 22 00 | 00 01 c6 ac f1 06 75 ac |......".|......u.| |00000060| f1 06 75 00 00 06 00 00 | 00 00 00 00 00 00 00 00 |..u.....|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 cb 5d 00 00 |........|.....]..| |00000080| 2f 2a 2a 2a 2a 2a 0d 20 | 2a 0d 20 2a 09 4d 79 48 |/*****. |*. *.MyH| |00000090| 61 6e 64 6c 65 72 73 2e | 63 0d 20 2a 0d 20 2a 09 |andlers.|c. *. *.| |000000a0| 4f 70 74 69 6f 6e 61 6c | 20 63 75 73 74 6f 6d 20 |Optional| custom | |000000b0| 66 75 6e 63 74 69 6f 6e | 73 20 74 6f 20 68 61 6e |function|s to han| |000000c0| 64 6c 65 20 73 70 65 63 | 69 61 6c 20 65 76 65 6e |dle spec|ial even| |000000d0| 74 73 2e 20 49 6e 63 6c | 75 64 65 73 3a 0d 20 2a |ts. Incl|udes:. *| |000000e0| 09 09 64 6f 63 75 6d 65 | 6e 74 20 6f 70 65 6e 69 |..docume|nt openi| |000000f0| 6e 67 2c 20 73 74 61 72 | 74 75 70 20 61 6e 64 20 |ng, star|tup and | |00000100| 71 75 69 74 74 69 6e 67 | 0d 20 2a 0d 20 2a 09 4d |quitting|. *. *.M| |00000110| 6f 64 69 66 79 20 74 68 | 65 73 65 20 66 75 6e 63 |odify th|ese func| |00000120| 74 69 6f 6e 73 20 69 66 | 20 79 6f 75 20 6e 65 65 |tions if| you nee| |00000130| 64 20 74 6f 20 61 64 64 | 20 74 6f 20 74 68 65 20 |d to add| to the | |00000140| 73 74 61 6e 64 61 72 64 | 20 73 75 70 70 6f 72 74 |standard| support| |00000150| 0d 20 2a 09 62 75 69 6c | 74 20 69 6e 74 6f 20 74 |. *.buil|t into t| |00000160| 68 65 20 66 72 61 6d 65 | 77 6f 72 6b 2e 0d 20 2a |he frame|work.. *| |00000170| 0d 20 2a 09 54 68 65 20 | 66 75 6e 63 74 69 6f 6e |. *.The |function| |00000180| 20 70 72 6f 74 6f 74 79 | 70 65 73 20 61 72 65 20 | prototy|pes are | |00000190| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 74 68 65 |containe|d in the| |000001a0| 20 72 65 6c 65 76 65 6e | 74 20 68 65 61 64 65 72 | releven|t header| |000001b0| 73 2e 0d 20 2a 09 46 6f | 72 20 65 78 61 6d 70 6c |s.. *.Fo|r exampl| |000001c0| 65 2c 20 41 45 48 61 6e | 64 6c 65 72 73 2e 68 20 |e, AEHan|dlers.h | |000001d0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 70 72 6f |contains| the pro| |000001e0| 74 6f 74 79 70 65 20 66 | 6f 72 20 4d 79 4f 70 65 |totype f|or MyOpe| |000001f0| 6e 44 6f 63 75 6d 65 6e | 74 0d 20 2a 0d 20 2a 09 |nDocumen|t. *. *.| |00000200| 54 68 69 73 20 69 73 20 | 61 20 73 75 70 70 6f 72 |This is |a suppor| |00000210| 74 20 66 69 6c 65 20 66 | 6f 72 20 22 47 72 61 6e |t file f|or "Gran| |00000220| 74 27 73 20 43 47 49 20 | 46 72 61 6d 65 77 6f 72 |t's CGI |Framewor| |00000230| 6b 22 2e 0d 20 2a 09 50 | 6c 65 61 73 65 20 73 65 |k".. *.P|lease se| |00000240| 65 20 74 68 65 20 6c 69 | 63 65 6e 73 65 20 61 67 |e the li|cense ag| |00000250| 72 65 65 6d 65 6e 74 20 | 74 68 61 74 20 61 63 63 |reement |that acc| |00000260| 6f 6d 70 61 6e 69 65 73 | 20 74 68 65 20 64 69 73 |ompanies| the dis| |00000270| 74 72 69 62 75 74 69 6f | 6e 20 70 61 63 6b 61 67 |tributio|n packag| |00000280| 65 0d 20 2a 09 66 6f 72 | 20 6c 69 63 65 6e 73 69 |e. *.for| licensi| |00000290| 6e 67 20 64 65 74 61 69 | 6c 73 2e 0d 20 2a 0d 20 |ng detai|ls.. *. | |000002a0| 2a 09 43 6f 70 79 72 69 | 67 68 74 20 a9 31 39 39 |*.Copyri|ght .199| |000002b0| 35 20 62 79 20 47 72 61 | 6e 74 20 4e 65 75 66 65 |5 by Gra|nt Neufe| |000002c0| 6c 64 0d 20 2a 09 67 72 | 61 6e 74 40 61 63 6d 2e |ld. *.gr|ant@acm.| |000002d0| 63 6f 6d 0d 20 2a 09 68 | 74 74 70 3a 2f 2f 61 72 |com. *.h|ttp://ar| |000002e0| 70 70 31 2e 63 61 72 6c | 65 74 6f 6e 2e 63 61 2f |pp1.carl|eton.ca/| |000002f0| 67 72 61 6e 74 2f 0d 20 | 2a 0d 20 2a 2a 2a 2a 2a |grant/. |*. *****| |00000300| 2f 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 4d 79 43 |/..#incl|ude "MyC| |00000310| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 2e 68 22 0d |onfigura|tion.h".| |00000320| 0d 23 69 6e 63 6c 75 64 | 65 20 22 63 6f 6d 70 69 |.#includ|e "compi| |00000330| 6c 65 72 5f 73 74 75 66 | 66 2e 68 22 0d 0d 23 69 |ler_stuf|f.h"..#i| |00000340| 66 20 6b 43 6f 6d 70 69 | 6c 65 57 69 74 68 44 72 |f kCompi|leWithDr| |00000350| 61 67 4e 44 72 6f 70 0d | 23 69 6e 63 6c 75 64 65 |agNDrop.|#include| |00000360| 20 3c 44 72 61 67 2e 68 | 3e 0d 23 65 6e 64 69 66 | <Drag.h|>.#endif| |00000370| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 41 45 48 61 |..#inclu|de "AEHa| |00000380| 6e 64 6c 65 72 73 2e 68 | 22 0d 23 69 6e 63 6c 75 |ndlers.h|".#inclu| |00000390| 64 65 20 22 43 47 49 2e | 68 22 0d 23 69 6e 63 6c |de "CGI.|h".#incl| |000003a0| 75 64 65 20 22 44 65 62 | 75 67 55 74 69 6c 2e 68 |ude "Deb|ugUtil.h| |000003b0| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 45 76 65 6e |".#inclu|de "Even| |000003c0| 74 55 74 69 6c 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |tUtil.h"|.#includ| |000003d0| 65 20 22 4c 69 73 74 53 | 54 41 52 2e 68 22 0d 23 |e "ListS|TAR.h".#| |000003e0| 69 6e 63 6c 75 64 65 20 | 22 51 75 69 74 2e 68 22 |include |"Quit.h"| |000003f0| 0d 23 69 6e 63 6c 75 64 | 65 20 22 53 74 61 72 74 |.#includ|e "Start| |00000400| 75 70 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |up.h".#i|nclude "| |00000410| 57 69 6e 64 6f 77 49 6e | 74 2e 68 22 0d 0d 0d 2f |WindowIn|t.h".../| |00000420| 2a 2a 2a 20 20 46 55 4e | 43 54 49 4f 4e 53 20 20 |*** FUN|CTIONS | |00000430| 2a 2a 2a 2f 0d 0d 23 70 | 72 61 67 6d 61 20 73 65 |***/..#p|ragma se| |00000440| 67 6d 65 6e 74 20 41 70 | 70 6c 65 45 76 65 6e 74 |gment Ap|pleEvent| |00000450| 73 0d 2f 2a 20 54 68 65 | 20 61 70 70 6c 69 63 61 |s./* The| applica| |00000460| 74 69 6f 6e 20 69 73 20 | 65 78 70 65 63 74 65 64 |tion is |expected| |00000470| 20 74 6f 20 6f 70 65 6e | 20 74 68 65 20 67 69 76 | to open| the giv| |00000480| 65 6e 20 64 6f 63 75 6d | 65 6e 74 73 2c 20 69 66 |en docum|ents, if| |00000490| 20 70 6f 73 73 69 62 6c | 65 20 2a 2f 0d 4f 53 45 | possibl|e */.OSE| |000004a0| 72 72 0d 4d 79 4f 70 65 | 6e 44 6f 63 75 6d 65 6e |rr.MyOpe|nDocumen| |000004b0| 74 20 28 20 46 53 53 70 | 65 63 20 2a 74 68 65 46 |t ( FSSp|ec *theF| |000004c0| 69 6c 65 20 29 0d 7b 0d | 09 4f 53 45 72 72 09 74 |ile ).{.|.OSErr.t| |000004d0| 68 65 45 72 72 3b 0d 09 | 0d 09 6d 79 5f 61 73 73 |heErr;..|..my_ass| |000004e0| 65 72 74 20 28 20 74 68 | 65 46 69 6c 65 20 21 3d |ert ( th|eFile !=| |000004f0| 20 6e 69 6c 2c 20 22 5c | 70 3a 20 74 68 65 46 69 | nil, "\|p: theFi| |00000500| 6c 65 20 70 74 72 20 69 | 73 20 6e 69 6c 22 20 29 |le ptr i|s nil" )| |00000510| 3b 0d 09 0d 09 74 68 65 | 45 72 72 20 3d 20 6e 6f |;....the|Err = no| |00000520| 45 72 72 3b 0d 09 0d 09 | 72 65 74 75 72 6e 20 74 |Err;....|return t| |00000530| 68 65 45 72 72 3b 0d 7d | 20 2f 2a 20 4d 79 4f 70 |heErr;.}| /* MyOp| |00000540| 65 6e 44 6f 63 75 6d 65 | 6e 74 20 2a 2f 0d 0d 0d |enDocume|nt */...| |00000550| 23 70 72 61 67 6d 61 20 | 73 65 67 6d 65 6e 74 20 |#pragma |segment | |00000560| 55 74 69 6c 69 74 69 65 | 73 0d 2f 2a 20 43 6c 6f |Utilitie|s./* Clo| |00000570| 73 65 20 61 6e 79 20 63 | 75 73 74 6f 6d 20 61 70 |se any c|ustom ap| |00000580| 70 6c 69 63 61 74 69 6f | 6e 20 77 69 6e 64 6f 77 |plicatio|n window| |00000590| 73 20 2a 2f 0d 23 69 66 | 20 6b 43 6f 6d 70 69 6c |s */.#if| kCompil| |000005a0| 65 57 69 74 68 41 70 70 | 6c 69 63 61 74 69 6f 6e |eWithApp|lication| |000005b0| 57 69 6e 64 6f 77 73 0d | 4f 53 45 72 72 0d 4d 79 |Windows.|OSErr.My| |000005c0| 43 6c 6f 73 65 57 69 6e | 64 6f 77 20 28 20 57 69 |CloseWin|dow ( Wi| |000005d0| 6e 64 6f 77 50 74 72 20 | 74 68 65 57 69 6e 64 6f |ndowPtr |theWindo| |000005e0| 77 20 29 0d 7b 0d 09 4f | 53 45 72 72 09 74 68 65 |w ).{..O|SErr.the| |000005f0| 45 72 72 3b 0d 09 0d 09 | 74 68 65 45 72 72 20 3d |Err;....|theErr =| |00000600| 20 6e 6f 45 72 72 3b 0d | 09 0d 09 72 65 74 75 72 | noErr;.|...retur| |00000610| 6e 20 74 68 65 45 72 72 | 3b 0d 7d 20 2f 2a 20 4d |n theErr|;.} /* M| |00000620| 79 43 6c 6f 73 65 57 69 | 6e 64 6f 77 20 2a 2f 0d |yCloseWi|ndow */.| |00000630| 23 65 6e 64 69 66 0d 0d | 0d 2f 2a 20 49 66 20 61 |#endif..|./* If a| |00000640| 63 74 69 76 61 74 65 20 | 69 73 20 74 72 75 65 2c |ctivate |is true,| |00000650| 20 72 65 73 74 6f 72 65 | 20 74 68 65 57 69 6e 64 | restore| theWind| |00000660| 6f 77 27 73 20 73 65 6c | 65 63 74 69 6f 6e 73 2e |ow's sel|ections.| |00000670| 0d 09 49 66 20 61 63 74 | 69 76 61 74 65 20 69 73 |..If act|ivate is| |00000680| 20 66 61 6c 73 65 2c 20 | 68 69 64 65 2c 20 6f 72 | false, |hide, or| |00000690| 20 72 65 64 75 63 65 20 | 74 6f 20 6f 75 74 6c 69 | reduce |to outli| |000006a0| 6e 65 2c 20 74 68 65 57 | 69 6e 64 6f 77 27 73 20 |ne, theW|indow's | |000006b0| 73 65 6c 65 63 74 69 6f | 6e 73 2e 0d 09 49 66 20 |selectio|ns...If | |000006c0| 74 68 65 57 69 6e 64 6f | 77 20 68 61 73 20 61 20 |theWindo|w has a | |000006d0| 67 72 6f 77 20 62 6f 78 | 20 69 6e 20 74 68 65 20 |grow box| in the | |000006e0| 62 6f 74 74 6f 6d 20 72 | 69 67 68 74 20 63 6f 72 |bottom r|ight cor| |000006f0| 6e 65 72 2c 0d 09 79 6f | 75 20 73 68 6f 75 6c 64 |ner,..yo|u should| |00000700| 20 69 6e 76 61 6c 69 64 | 61 74 65 20 74 68 65 20 | invalid|ate the | |00000710| 67 72 6f 77 72 65 63 74 | 20 2a 2f 0d 23 69 66 20 |growrect| */.#if | |00000720| 6b 43 6f 6d 70 69 6c 65 | 57 69 74 68 41 70 70 6c |kCompile|WithAppl| |00000730| 69 63 61 74 69 6f 6e 57 | 69 6e 64 6f 77 73 0d 76 |icationW|indows.v| |00000740| 6f 69 64 0d 4d 79 41 63 | 74 69 76 61 74 65 57 69 |oid.MyAc|tivateWi| |00000750| 6e 64 6f 77 20 28 20 57 | 69 6e 64 6f 77 50 74 72 |ndow ( W|indowPtr| |00000760| 20 74 68 65 57 69 6e 64 | 6f 77 2c 20 42 6f 6f 6c | theWind|ow, Bool| |00000770| 65 61 6e 20 61 63 74 69 | 76 61 74 65 20 29 0d 7b |ean acti|vate ).{| |00000780| 0d 09 0d 7d 20 2f 2a 20 | 4d 79 41 63 74 69 76 61 |...} /* |MyActiva| |00000790| 74 65 57 69 6e 64 6f 77 | 20 2a 2f 0d 23 65 6e 64 |teWindow| */.#end| |000007a0| 69 66 0d 0d 0d 2f 2a 20 | 44 72 61 77 20 63 6f 6e |if.../* |Draw con| |000007b0| 74 65 6e 74 73 20 6f 66 | 20 77 69 6e 64 6f 77 20 |tents of| window | |000007c0| 6f 6e 20 61 6e 20 75 70 | 64 61 74 65 20 65 76 65 |on an up|date eve| |000007d0| 6e 74 20 2a 2f 0d 23 69 | 66 20 6b 43 6f 6d 70 69 |nt */.#i|f kCompi| |000007e0| 6c 65 57 69 74 68 41 70 | 70 6c 69 63 61 74 69 6f |leWithAp|plicatio| |000007f0| 6e 57 69 6e 64 6f 77 73 | 0d 76 6f 69 64 0d 4d 79 |nWindows|.void.My| |00000800| 55 70 64 61 74 65 57 69 | 6e 64 6f 77 20 28 20 57 |UpdateWi|ndow ( W| |00000810| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind| |00000820| 6f 77 20 29 0d 7b 0d 09 | 0d 7d 20 2f 2a 20 4d 79 |ow ).{..|.} /* My| |00000830| 55 70 64 61 74 65 57 69 | 6e 64 6f 77 20 2a 2f 0d |UpdateWi|ndow */.| |00000840| 23 65 6e 64 69 66 0d 0d | 0d 2f 2a 20 53 75 70 70 |#endif..|./* Supp| |00000850| 6f 72 74 20 61 20 63 6c | 69 63 6b 20 69 6e 20 61 |ort a cl|ick in a| |00000860| 20 77 69 6e 64 6f 77 2e | 0d 09 49 66 20 74 68 65 | window.|..If the| |00000870| 20 63 6c 69 63 6b 20 69 | 73 20 6f 6e 20 61 20 64 | click i|s on a d| |00000880| 72 61 67 61 62 6c 65 20 | 69 74 65 6d 2c 20 73 65 |ragable |item, se| |00000890| 74 20 6f 6e 44 72 61 67 | 49 74 65 6d 20 74 6f 20 |t onDrag|Item to | |000008a0| 74 72 75 65 2e 20 2a 2f | 0d 23 69 66 20 6b 43 6f |true. */|.#if kCo| |000008b0| 6d 70 69 6c 65 57 69 74 | 68 41 70 70 6c 69 63 61 |mpileWit|hApplica| |000008c0| 74 69 6f 6e 57 69 6e 64 | 6f 77 73 0d 76 6f 69 64 |tionWind|ows.void| |000008d0| 0d 4d 79 43 6c 69 63 6b | 49 6e 57 69 6e 64 6f 77 |.MyClick|InWindow| |000008e0| 20 28 20 57 69 6e 64 6f | 77 50 74 72 20 74 68 65 | ( Windo|wPtr the| |000008f0| 57 69 6e 64 6f 77 2c 20 | 50 6f 69 6e 74 20 74 68 |Window, |Point th| |00000900| 65 50 6f 69 6e 74 2c 20 | 42 6f 6f 6c 65 61 6e 20 |ePoint, |Boolean | |00000910| 2a 6f 6e 44 72 61 67 49 | 74 65 6d 20 29 0d 7b 0d |*onDragI|tem ).{.| |00000920| 09 0d 7d 20 2f 2a 20 4d | 79 43 6c 69 63 6b 49 6e |..} /* M|yClickIn| |00000930| 57 69 6e 64 6f 77 20 2a | 2f 0d 23 65 6e 64 69 66 |Window *|/.#endif| |00000940| 0d 0d 0d 2f 2a 20 49 66 | 20 79 6f 75 20 61 64 64 |.../* If| you add| |00000950| 20 77 69 6e 64 6f 77 73 | 20 74 68 61 74 20 61 6c | windows| that al| |00000960| 6c 6f 77 20 66 6f 72 20 | 74 65 78 74 20 65 6e 74 |low for |text ent| |00000970| 72 79 20 6f 72 20 79 6f | 75 20 61 63 63 65 70 74 |ry or yo|u accept| |00000980| 20 6e 6f 6e 2d 63 6f 6d | 6d 61 6e 64 2d 6b 65 79 | non-com|mand-key| |00000990| 0d 09 6b 65 79 62 6f 61 | 72 64 20 69 6e 70 75 74 |..keyboa|rd input| |000009a0| 2c 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 73 75 |, you ne|ed to su| |000009b0| 70 70 6f 72 74 20 74 68 | 69 73 20 66 75 6e 63 74 |pport th|is funct| |000009c0| 69 6f 6e 2e 20 2a 2f 0d | 23 69 66 20 6b 43 6f 6d |ion. */.|#if kCom| |000009d0| 70 69 6c 65 57 69 74 68 | 4b 65 79 62 6f 61 72 64 |pileWith|Keyboard| |000009e0| 45 76 65 6e 74 73 0d 76 | 6f 69 64 0d 4d 79 4b 65 |Events.v|oid.MyKe| |000009f0| 79 50 72 65 73 73 20 28 | 20 45 76 65 6e 74 52 65 |yPress (| EventRe| |00000a00| 63 6f 72 64 20 2a 74 68 | 65 45 76 65 6e 74 20 29 |cord *th|eEvent )| |00000a10| 0d 7b 0d 09 0d 7d 20 2f | 2a 20 4d 79 4b 65 79 50 |.{...} /|* MyKeyP| |00000a20| 72 65 73 73 20 2a 2f 0d | 23 65 6e 64 69 66 0d 0d |ress */.|#endif..| |00000a30| 0d 2f 2a 20 20 2a 2f 0d | 23 69 66 20 6b 43 6f 6d |./* */.|#if kCom| |00000a40| 70 69 6c 65 57 69 74 68 | 44 72 61 67 4e 44 72 6f |pileWith|DragNDro| |00000a50| 70 0d 4f 53 45 72 72 0d | 4d 79 44 6f 53 74 61 72 |p.OSErr.|MyDoStar| |00000a60| 74 44 72 61 67 20 28 20 | 45 76 65 6e 74 52 65 63 |tDrag ( |EventRec| |00000a70| 6f 72 64 20 2a 74 68 65 | 45 76 65 6e 74 2c 20 57 |ord *the|Event, W| |00000a80| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind| |00000a90| 6f 77 20 29 0d 7b 0d 09 | 4f 53 45 72 72 09 09 09 |ow ).{..|OSErr...| |00000aa0| 74 68 65 45 72 72 3b 0d | 09 47 72 61 66 50 74 72 |theErr;.|.GrafPtr| |00000ab0| 09 09 09 73 61 76 65 50 | 6f 72 74 3b 0d 09 44 72 |...saveP|ort;..Dr| |00000ac0| 61 67 52 65 66 65 72 65 | 6e 63 65 09 74 68 65 44 |agRefere|nce.theD| |00000ad0| 72 61 67 3b 0d 09 52 67 | 6e 48 61 6e 64 6c 65 09 |rag;..Rg|nHandle.| |00000ae0| 09 64 72 61 67 52 65 67 | 69 6f 6e 3b 0d 09 0d 09 |.dragReg|ion;....| |00000af0| 47 65 74 50 6f 72 74 20 | 28 20 26 73 61 76 65 50 |GetPort |( &saveP| |00000b00| 6f 72 74 20 29 3b 0d 09 | 53 65 74 50 6f 72 74 20 |ort );..|SetPort | |00000b10| 28 20 28 47 72 61 66 50 | 74 72 29 74 68 65 57 69 |( (GrafP|tr)theWi| |00000b20| 6e 64 6f 77 20 29 3b 0d | 09 0d 09 74 68 65 45 72 |ndow );.|...theEr| |00000b30| 72 20 3d 20 4e 65 77 44 | 72 61 67 20 28 20 26 74 |r = NewD|rag ( &t| |00000b40| 68 65 44 72 61 67 20 29 | 3b 0d 09 0d 09 69 66 20 |heDrag )|;....if | |00000b50| 28 20 74 68 65 45 72 72 | 20 3d 3d 20 6e 6f 45 72 |( theErr| == noEr| |00000b60| 72 20 29 0d 09 7b 0d 09 | 09 64 72 61 67 52 65 67 |r )..{..|.dragReg| |00000b70| 69 6f 6e 20 3d 20 4e 65 | 77 52 67 6e 20 28 29 3b |ion = Ne|wRgn ();| |00000b80| 0d 09 09 0d 09 09 2f 2a | 20 a5 a5 a5 20 59 6f 75 |....../*| ... You| |00000b90| 20 6e 65 65 64 20 74 6f | 20 63 61 6c 6c 20 61 20 | need to| call a | |00000ba0| 66 75 6e 63 74 69 6f 6e | 20 74 68 61 74 20 73 65 |function| that se| |00000bb0| 74 73 20 75 70 20 74 68 | 65 20 64 72 61 67 20 76 |ts up th|e drag v| |00000bc0| 61 6c 75 65 73 20 73 75 | 63 68 20 61 73 3a 0d 09 |alues su|ch as:..| |00000bd0| 09 09 74 68 65 45 72 72 | 20 3d 20 63 75 73 74 6f |..theErr| = custo| |00000be0| 6d 53 65 74 75 70 44 72 | 61 67 20 28 20 74 68 65 |mSetupDr|ag ( the| |00000bf0| 57 69 6e 64 6f 77 2c 20 | 74 68 65 44 72 61 67 2c |Window, |theDrag,| |00000c00| 20 64 72 61 67 52 65 67 | 69 6f 6e 2c 20 74 68 65 | dragReg|ion, the| |00000c10| 45 76 65 6e 74 2d 3e 77 | 68 65 72 65 20 29 3b 20 |Event->w|here ); | |00000c20| 2a 2f 0d 09 7d 0d 09 65 | 6c 73 65 0d 09 7b 0d 09 |*/..}..e|lse..{..| |00000c30| 09 74 68 65 44 72 61 67 | 20 3d 20 6e 69 6c 3b 0d |.theDrag| = nil;.| |00000c40| 09 7d 0d 09 0d 09 53 65 | 74 50 6f 72 74 20 28 20 |.}....Se|tPort ( | |00000c50| 73 61 76 65 50 6f 72 74 | 20 29 3b 0d 09 0d 09 74 |savePort| );....t| |00000c60| 68 65 45 72 72 20 3d 20 | 54 72 61 63 6b 44 72 61 |heErr = |TrackDra| |00000c70| 67 20 28 20 74 68 65 44 | 72 61 67 2c 20 74 68 65 |g ( theD|rag, the| |00000c80| 45 76 65 6e 74 2c 20 64 | 72 61 67 52 65 67 69 6f |Event, d|ragRegio| |00000c90| 6e 20 29 3b 0d 09 0d 09 | 69 66 20 28 20 64 72 61 |n );....|if ( dra| |00000ca0| 67 52 65 67 69 6f 6e 20 | 21 3d 20 6e 69 6c 20 29 |gRegion |!= nil )| |00000cb0| 0d 09 7b 0d 09 09 44 69 | 73 70 6f 73 65 52 67 6e |..{...Di|sposeRgn| |00000cc0| 20 28 20 64 72 61 67 52 | 65 67 69 6f 6e 20 29 3b | ( dragR|egion );| |00000cd0| 0d 09 7d 0d 09 0d 09 69 | 66 20 28 20 74 68 65 44 |..}....i|f ( theD| |00000ce0| 72 61 67 20 21 3d 20 6e | 69 6c 20 29 0d 09 7b 0d |rag != n|il )..{.| |00000cf0| 09 09 44 69 73 70 6f 73 | 65 44 72 61 67 20 28 20 |..Dispos|eDrag ( | |00000d00| 74 68 65 44 72 61 67 20 | 29 3b 0d 09 7d 0d 09 09 |theDrag |);..}...| |00000d10| 0d 09 72 65 74 75 72 6e | 20 74 68 65 45 72 72 3b |..return| theErr;| |00000d20| 0d 7d 20 2f 2a 20 4d 79 | 44 6f 53 74 61 72 74 44 |.} /* My|DoStartD| |00000d30| 72 61 67 20 2a 2f 0d 23 | 65 6e 64 69 66 0d 0d 0d |rag */.#|endif...| |00000d40| 23 70 72 61 67 6d 61 20 | 73 65 67 6d 65 6e 74 20 |#pragma |segment | |00000d50| 53 74 61 72 74 75 70 0d | 2f 2a 20 61 64 64 20 74 |Startup.|/* add t| |00000d60| 68 69 6e 67 73 20 6c 69 | 6b 65 20 69 6e 73 74 61 |hings li|ke insta| |00000d70| 6c 6c 69 6e 67 20 61 64 | 64 69 74 69 6f 6e 61 6c |lling ad|ditional| |00000d80| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 68 61 6e 64 | AppleEv|ent hand| |00000d90| 6c 65 72 73 20 69 6e 20 | 74 68 69 73 20 66 75 6e |lers in |this fun| |00000da0| 63 74 69 6f 6e 20 2a 2f | 0d 4f 53 45 72 72 0d 4d |ction */|.OSErr.M| |00000db0| 79 53 74 61 72 74 75 70 | 20 28 20 76 6f 69 64 20 |yStartup| ( void | |00000dc0| 29 0d 7b 0d 09 4f 53 45 | 72 72 09 74 68 65 45 72 |).{..OSE|rr.theEr| |00000dd0| 72 3b 0d 09 0d 09 4d 79 | 43 47 49 53 74 61 72 74 |r;....My|CGIStart| |00000de0| 75 70 09 09 28 29 3b 09 | 2f 2a 20 43 47 49 20 53 |up..();.|/* CGI S| |00000df0| 70 65 63 69 66 69 63 20 | 2a 2f 0d 09 4d 79 4c 69 |pecific |*/..MyLi| |00000e00| 73 74 53 54 41 52 53 74 | 61 72 74 75 70 09 28 29 |stSTARSt|artup.()| |00000e10| 3b 09 2f 2a 20 4c 69 73 | 74 53 54 41 52 20 53 70 |;./* Lis|tSTAR Sp| |00000e20| 65 63 69 66 69 63 20 2a | 2f 0d 09 0d 09 74 68 65 |ecific *|/....the| |00000e30| 45 72 72 20 3d 20 6e 6f | 45 72 72 3b 0d 09 0d 09 |Err = no|Err;....| |00000e40| 72 65 74 75 72 6e 20 74 | 68 65 45 72 72 3b 0d 7d |return t|heErr;.}| |00000e50| 20 2f 2a 20 4d 79 53 74 | 61 72 74 75 70 20 2a 2f | /* MySt|artup */| |00000e60| 0d 0d 0d 23 70 72 61 67 | 6d 61 20 73 65 67 6d 65 |...#prag|ma segme| |00000e70| 6e 74 20 4d 61 69 6e 0d | 2f 2a 20 55 6e 6c 65 73 |nt Main.|/* Unles| |00000e80| 73 20 61 6c 6c 6f 77 55 | 73 65 72 49 6e 74 65 72 |s allowU|serInter| |00000e90| 61 63 74 20 69 73 20 74 | 72 75 65 2c 20 64 6f 6e |act is t|rue, don| |00000ea0| 27 74 20 6d 61 6b 65 20 | 61 6e 79 20 63 61 6c 6c |'t make |any call| |00000eb0| 73 20 74 68 61 74 20 6d | 69 67 68 74 20 72 65 71 |s that m|ight req| |00000ec0| 75 69 72 65 0d 09 75 73 | 65 72 20 69 6e 74 65 72 |uire..us|er inter| |00000ed0| 61 63 74 69 6f 6e 2e 0d | 09 52 65 74 75 72 6e 20 |action..|.Return | |00000ee0| 74 72 75 65 20 69 66 20 | 79 6f 75 72 20 63 6c 65 |true if |your cle| |00000ef0| 61 6e 20 75 70 20 77 61 | 73 20 73 75 63 63 65 73 |an up wa|s succes| |00000f00| 73 66 75 6c 20 61 6e 64 | 20 71 75 69 74 74 69 6e |sful and| quittin| |00000f10| 67 20 73 68 6f 75 6c 64 | 20 70 72 6f 63 65 65 64 |g should| proceed| |00000f20| 2e 20 2a 2f 0d 42 6f 6f | 6c 65 61 6e 0d 4d 79 51 |. */.Boo|lean.MyQ| |00000f30| 75 69 74 20 28 20 42 6f | 6f 6c 65 61 6e 20 61 6c |uit ( Bo|olean al| |00000f40| 6c 6f 77 55 73 65 72 49 | 6e 74 65 72 61 63 74 20 |lowUserI|nteract | |00000f50| 29 0d 7b 0d 09 72 65 74 | 75 72 6e 20 4d 79 43 47 |).{..ret|urn MyCG| |00000f60| 49 51 75 69 74 20 28 20 | 61 6c 6c 6f 77 55 73 65 |IQuit ( |allowUse| |00000f70| 72 49 6e 74 65 72 61 63 | 74 20 29 3b 0d 7d 20 2f |rInterac|t );.} /| |00000f80| 2a 20 4d 79 51 75 69 74 | 20 2a 2f 0d 0d 0d 2f 2a |* MyQuit| */.../*| |00000f90| 2a 2a 2a 2a 20 20 45 4f | 46 20 20 2a 2a 2a 2a 2a |**** EO|F *****| |00000fa0| 2f 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |/.......|........| |00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001000| 00 00 01 00 00 00 01 74 | 00 00 00 74 00 00 00 52 |.......t|...t...R| |00001010| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser| |00001020| 76 65 64 2e 0d 00 00 01 | 00 00 00 18 25 00 00 17 |ved.....|....%...| |00001030| 0c 4d 79 48 61 6e 64 6c | 65 72 73 2e 63 8b 02 00 |.MyHandl|ers.c...| |00001040| 00 00 54 45 58 54 43 57 | 49 45 00 06 00 00 00 00 |..TEXTCW|IE......| |00001050| 00 00 54 45 58 54 43 57 | 49 45 00 06 00 00 00 00 |..TEXTCW|IE......| |00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001070| 00 00 ac 8b 1d ba 00 00 | 00 00 00 00 01 c6 23 00 |........|......#.| |00001080| 07 01 9e 69 63 6c 38 00 | 00 01 fe 69 63 6c 34 00 |...icl8.|...icl4.| |00001090| 01 02 0a 69 63 73 38 00 | 00 02 22 69 63 73 34 00 |...ics8.|.."ics4.| |000010a0| 01 02 2e 4d 41 43 53 00 | 00 02 46 46 43 4d 54 00 |...MACS.|..FFCMT.| |000010b0| 00 02 52 00 00 ff ff 04 | 00 00 00 00 72 1c 1c 00 |..R.....|....r...| |000010c0| 00 ff ff 04 00 0a 55 00 | 72 13 68 54 47 ff ff 24 |......U.|r.hTG..$| |000010d0| 00 01 28 00 72 17 a0 1f | 14 ff ff 24 00 02 61 00 |..(.r...|...$..a.| |000010e0| 72 13 e8 22 3d ff ff 24 | 00 16 2e 00 72 13 90 00 |r.."=..$|....r...| |000010f0| 00 ff ff 24 00 00 0f 00 | 72 17 94 4d 92 ff ff 24 |...$....|r..M...$| |00001100| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....| |00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001120| 00 00 00 00 00 00 00 03 | 00 04 00 29 00 03 01 a2 |........|...)....| |00001130| 02 42 00 57 00 05 01 b4 | 02 19 ad 2d a0 41 00 00 |.B.W....|...-.A..| |00001140| 0d 7b 00 00 0d aa 00 00 | 0c 91 01 00 00 00 00 04 |.{......|........| |00001150| 00 01 00 01 00 00 00 1c | 01 01 ff ff ff ff ff ff |........|........| |00001160| 00 00 06 40 00 01 00 00 | 00 00 00 00 00 00 00 00 |...@....|........| |00001170| 00 00 00 00 00 00 01 00 | 00 00 01 74 00 00 00 74 |........|...t...t| |00001180| 00 00 00 52 00 68 1a 70 | 0f 10 00 00 00 1c 00 52 |...R.h.p|.......R| |00001190| 00 01 4d 50 53 52 00 01 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..| |000011a0| 00 2a 03 ed ff ff 00 00 | 00 00 00 62 ac 30 27 10 |.*......|...b.0'.| |000011b0| ff ff 00 00 00 54 00 62 | aa f4 03 f0 ff ff 00 00 |.....T.b|........| |000011c0| 00 4c 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.L......|........| |000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+